Don't request window sizes with zero width or height
authorAlexander Larsson <alexl@redhat.com>
Mon, 5 Oct 2009 20:07:06 +0000 (22:07 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 5 Oct 2009 20:07:06 +0000 (22:07 +0200)
commitc5d086117982b1997389afd08a52ddaf2fdf8254
tree3278054f42c358ec1f6399a0122f3d42fee08d93
parent786b589d95077b465dcc2311ff2489ee7bb9a49f
Don't request window sizes with zero width or height

Zero width/height is unsupported and will magically be turned into one.
For instance, gtk_widget_size_allocate() will eventually do this magic
on the value stored in widget->allocation.

However, if we don't do this magic conversion early, then the value
returned from gtk_window_compute_configure_request() will not be
comparable with whats stored in widget->allocation. (I.E. they will
differ if width or height are zero).

This is dangerous, as we do such a comparison in gtk_window_move_resize().
Currently a change from e.g. 10x1 (current allocation) to 10x0 (new size)
will be expected to produce a ConfigureNotify, when it actually won't,
thus never thawing the frozen toplevel.

Fixes bug #588059
gtk/gtkwindow.c